<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            height: 100px;
            background-color: skyblue;

            /*单行文字居中*/
            /*垂直居中：行高属性值等于盒子高度属性值*/
            line-height: 100px;
            font-size: 30px;
        }
    </style>
</head>
<body>
   <div>文122222222222222223<br>字</div>
</body>
</html>